package com.acane.instagram.utils;

import com.acane.instagram.pojo.Message;
import com.acane.instagram.pojo.dto.ChatDTO;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

public class MessageUtils {
    public static String getMessage(Message<ChatDTO> message, boolean isSystem) {

        System.out.println("-----------------系统消息：" + message);
        ObjectMapper mapper = new ObjectMapper();
        try {
            return mapper.writeValueAsString(message);
        } catch (JsonProcessingException e) {
            e.printStackTrace();
        }
        return null;
    }
}
